var case1 = function () {
    return new Promise(function (resolve) {
        console.log("1-1");
        setTimeout(function () {
            resolve();
        }, 1000);
    }).then(function () {
        return new Promise(function (resolve) {
            console.log("1-2");
            setTimeout(function () {
                resolve();
            }, 1000);
        });
    }).then(function () {
        return new Promise(function (resolve) {
            console.log("1-3");
            setTimeout(function () {
                resolve();
            }, 1000);
        });
    }).then(function () {
        return new Promise(function (resolve) {
            console.log("1-4");
            setTimeout(function () {
                resolve();
            }, 1000);
        });
    }).then(function () {
        return new Promise(function (resolve) {
            console.log("1-5");
            setTimeout(function () {
                resolve();
            }, 1000);
        });
    }).then(function () {
        return new Promise(function (resolve) {
            console.log("1-6");
            setTimeout(function () {
                resolve();
            }, 1000);
        });
    });
}
console.log("2-1");
case1().then(function () {
    console.log("x-x");
});
console.log("2-2");